package com.seuic.hnapps.adapter;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.seuic.hnapps.R;
import com.seuic.hnapps.bean.InTrates_Bean;

import java.util.List;

/**
 * 利率
 */
public class InTrates_adapter extends BaseQuickAdapter<InTrates_Bean, BaseViewHolder> {
    public InTrates_adapter(int layoutResId, @Nullable List<InTrates_Bean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, InTrates_Bean item) {
        helper.setText(R.id.interse_trates_item_name, item.getName() + "");
        String num_end = item.getNum().substring(item.getNum().length() - 5,item.getNum().length());
        String num_1 = item.getNum().substring(item.getNum().length() - 6,item.getNum().length() - 5);
        helper.setText(R.id.interse_trates_item_num, num_1 +"."+num_end+ "%");
    }
}
